let vm = new Vue({
    el: '.main-content',
    data: {
        pageInfo: {},
        qualification: {},
        condition: {
            type: '',
            check: ''
        }
    },
    methods: {
        selectPage: function (pageNum = 1, pageSize = 15) {

            axios({
                url: `mapper/qualification/selectPage/${pageNum}/${pageSize}`,
                params: this.condition
            }).then(response => {
                this.pageInfo = response.data.obj;
            }).catch(error => {
                console.log(error.message)
            })
        },
        selectAll: function () {
            this.condition = {
                type: '',
                check: ''
            };
            this.selectPage()
        },
        toUpdate: function (qualification) {
            layer.obj = qualification;

            layer.open({
                type: 2,      //表示弹出一个iframe
                title: false,  //是否设置标题
                // closeBtn: 0, //不显示关闭按钮
                // shade: [0],
                area: ['70%', '70%'],  //设置子窗口的宽高
                // offset: 'rb', //右下角弹出    //默认中间
                // time: 20000, //20秒后自动关闭
                // anim: 2,
                content: 'mapper/qualification/toUpdate', //iframe的url
                end: () => { //此处用于演示

                    if (layer.success != undefined || layer.success) {
                        layer.msg("更新完成")
                        this.selectPage();//刷新页面
                    }
                }
            })
        }
    },
    created: function () {
        this.selectPage();

    }

});